/**
* Copyright (c) 2022 Beijing Jiaotong University
* PhotLab is licensed under [Open Source License].
* You can use this software according to the terms and conditions of the [Open Source License].
* You may obtain a copy of [Open Source License] at: [https://open.source.license/]
* 
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* 
* See the [Open Source License] for more details.
* 
* Author: Zhenjie Wei
* Created: Mar. 23, 2023
* Supported by: National Key Research and Development Program of China
*/

@import './cmp_message.scss';

@mixin phot-passive-device-center {
    height: 100%;
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
    position: relative;
    box-sizing: border-box;
    .pui-tabs {
        flex-shrink: 0;
        width: 100%;
        box-sizing: border-box;
        height: 31px;
        border-top: 1px solid $border_light;
        border-right: 0;
        border-left: 0;
        .pui-tabs_content {
            background: $bg-home_light;
            height: 100%;
            .pui-tab {
                // padding: 0;
                margin: 0;
                &.active-tab {
                    &:nth-child(3) {
                        border-left: none !important;
                    }
                }
            }
        }
    }
    .preview-content {
        flex: 1;
        box-sizing: border-box;
        position: absolute;
        top: 30px;
        left: 0;
        right: -1px;
        bottom: 29px;
        .content-null {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            height: 100%;
            width: 100%;
            .img {
                width: 188px;
                img {
                    width: 188px;
                }
            }
            .btn-list {
                padding-top: 50px;
            }
        }
        .preview-list {
            height: 100%;
            width: 100%;
            .view-content {
                height: 100%;
                width: 100%;
                .view-list {
                    display: flex;
                    justify-content: flex-start;
                    align-items: flex-start;
                    flex-wrap: wrap;
                    height: 100%;
                    width: 100%;
                    .view-item {
                        height: 50%;
                        width: 50%;
                        .view-container {
                            width: 100%;
                            height: 100%;
                            box-sizing: border-box;
                            position: relative;
                            &:nth-child(2n-1) {
                                border-right: 1px solid $border-lighter_light;
                            }
                            &:nth-child(1), &:nth-child(2) {
                                border-bottom: 1px solid $border-lighter_light;
                            }
                            .view-item__header {
                                height: 24px;
                                width: 100%;
                                background-color: $border_light;
                                font-size: 12px;
                                box-sizing: border-box;
                                padding-left: 20px;
                                line-height: 24px;
                                display: flex;
                                justify-content: flex-start;
                                align-items: center;
                                .title {
                                    font-size: 12px;
                                    display: flex;
                                    justify-content: flex-start;
                                    align-items: center;
                                }
                                .inline-block {
                                    display: flex;
                                    justify-content: center;
                                    align-items: center;
                                }
                                .arrow_icon {
                                    display: flex;
                                    align-items: center;
                                    justify-content: center;
                                    cursor: pointer;
                                    font-size: 12px;
                                }
                                .pui-selector-content {
                                    position: relative;
                                    width: 100%;
                                    box-sizing: border-box;
                                    z-index: 2;
                                    padding: 5px 0;
                                    .pui-selector-content_list {
                                        .pui-selector-content_item {
                                            display: flex;
                                            padding: 5px 17px;
                                            font-size: 12px;
                                            justify-content: center;
                                            white-space: nowrap;
                                            &:hover {
                                                background: $primary-fill;
                                            }
                                            &.active-item {
                                                color: $primary-fill;
                                            }
                                            .content-icon {
                                                display: flex;
                                            }
                                            .content-label {
                                                font-size: 12px;
                                                align-self: center;
                                                white-space: nowrap;
                                            }
                                        }
                                    }
                                }
                            }
                            .view-item__content {
                                box-sizing: border-box;
                                display: flex;
                                justify-content: center;
                                align-items: center;
                                position: absolute;
                                top: 24px;
                                left: 0;
                                right: 0;
                                bottom: 0;
                                overflow: hidden;
                                img {
                                    height: 100%;
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    .log-content {
        @include phot-passive-device-message;
        box-sizing: border-box;
    }
}

@mixin phot-passive-device-center-dark {
    // border-top: 1px solid $border_dark;
    .pui-tabs {
        border-bottom: 1px solid #fff;
        .pui-tabs_content {
            background: $bg-tool_dark;
            .pui-tab {
                &:hover {
                    .pui-tab_name {
                    }
                }
                &.active-tab {
                    &:nth-child(3) {
                    }
                }
            }
        }
    }
    .preview-content {
        .file-content {
        }
    }
    .log-content {
        @include phot-passive-device-message-dark;
    }
}
